/**
 * @Author: lianghuan
 * @Description: CollectRoute
 * @emoji - ( ゜- ゜)つロ 乾杯~
 * @email lianghuanA@outlook.com
 * @Date: 2021-10-12 17:34
 * @Version: 1.0.0
 */

package router

import (
	"github.com/gin-gonic/gin"
	"go-gin/controller"
	"go-gin/middleware"
)

func CollectRoute(r *gin.Engine) *gin.Engine {
	r.Use(middleware.CORSMiddleware(), middleware.RecoveryMiddleware())
	r.POST("/api/auth/register", controller.Register)
	r.POST("/api/auth/login", controller.Login)

	return r
}
